add otp field to reflex components internal#6467
Conversation
Greptile SummaryThis PR adds a new
Confidence Score: 3/5The new OTP field logic is mostly sound, but two issues make this worth pausing on before merge: the high-level wrapper can produce a component missing its required The
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["otp_field(…)"] --> B{"children provided?"}
B -- "No" --> C{"length is int?"}
C -- "No" --> D["raise TypeError"]
C -- "Yes" --> E["length > 0? (no guard currently)"]
E -- "generate N OTPFieldInput slots" --> F["OTPFieldRoot.create(children, **props)"]
B -- "Yes" --> G{"length in props?\n(no validation)"}
G -- "Yes" --> F
G -- "No (silent)" --> H["OTPFieldRoot.create(children)\nlength=undefined → runtime error"]
F --> I["Rendered OTPField in DOM"]
Reviews (1): Last reviewed commit: "add otp field to reflex components inter..." | Re-trigger Greptile |
Merging this PR will not alter performance
Comparing Footnotes
|
No description provided.